<!DOCTYPE html>
<html>

<head>

    {include file="Public/header"}
    <style>
        .row {
            border: 1px solid #ccc;
            margin: 0 auto;
        }

        .agencyM_table tr th {
            text-align: center;
            font-size: 14px;
            background: #d0e0e0;
        }

        .textR {
            text-align: right;
        }

        .td2 {
            min-width: 140px
        }
    </style>

</head>

<body class="white-bg" style="color:#333;padding:3px;">
<div class="ibox-content " style="position:fixed;width:150%;left:0;top:0;">
    <button class="btn btn-success btn-outline">已进场</button>
    <button class="btn btn-warning  btn-outline">已退场</button>
    <button class="btn btn-primary btn-outline ">导入网点已进场条码</button>
</div>
<div style="height:70px;"></div>
<table class="table agencyM_table table-bordered table-hover">
    <tr>
        <th>序号</th>
        <th>状态</th>
        <th>重复进场</th>
        <th>单品名称</th>
        <th>SKU</th>
        <th>进场时间</th>
        <th>进场费(元)</th>
        <th>卖场零售价(元)</th>
        <th>库存数量</th>
        <th>上月销量</th>
        <th>累计销量</th>
        <th>退场时间</th>
        <th>备注</th>
        <th style="width:5%;"><button class="btn  btn-primary" id="addbar">添加</button></th>
    </tr>
    {volist name="data" id="row" key="k"}
    <tr>
        <td>{$k}</td>
        <td>正常</td>
        <td>否</td>
        <td>{$row.prod}</td>
        <td>{$row.pro_sku}</td>
        <td>{:date('Y-m-d',$row.intime)}</td>
        <td>{$row.infee}</td>
        <td>{$row.retailPrice}</td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td>
            <button class="btn  btn-default tuichang" data-id="{$row.id}">退场</button><br>
            <button class="btn  btn-default" style="margin-top:5px;">维护</button><br>
            <button class="btn  btn-default" style="margin-top:5px;">查看汇报</button>
        </td>
    </tr>
    {/volist}

</table>
<form action="" id="add"></form>

<!-- 全局js -->
{include file="Public/footer"}
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script>
    $(function(){
        $('.tuichang').on('click',function(){
            var id = $(this).data('id')
            var str = '<div class="ibox" id="tuichang" ' +
                    '<div class="ibox-title"><h3>条码退场</h3></div> ' +
                    '<div class="ibox-content"> ' +
                    '<table class="table table-bordered"> ' +
                    '<tr> <td>条码名称</td> <td>111</td> ' +
                    '<td>进场时间</td>' +
                    '<td>1111</td>' +
                    '</tr>' +
                    '<tr>' +
                    '<td>退场时间</td>' +
                    ' <td><input type="text" onclick="laydate()" class="form-control"></td>' +
                    '<td>退场原因</td>' +
                    '<td><input type="text" class="form-control"></td>' +
                    '</tr>' +
                    '</table>' +
                    '<div class="text-center">' +
                    '<button class="baocun">保存</button>' +
                    '<button>返回</button>' +
                    '</div>' +
                    '</div>' +
                    '</div>';
            top.layer.open({
                type:1,
                title:'退场',
                area:['60%','60%'],
                fixed:false,
                maxmin:true,
                content:str
            })
        })
        top.$('body').on('click','#tuichang',function(){
            alert(111)
        })
        $('#addbar').click(function () {
            top.layer.open({
                type: 2,
                title: '添加',
                area: ['60%', '60%'],
                fixed: false, //不固定
                maxmin: true,
                content: '{:url("form_barcode",["id"=>request()->param("id")])}'
            });
            return false
        })
    })
</script>
</body>

</html>